package com.wms.db.dao;

import java.util.List;
import java.util.Map;


public interface IBaseDao { 
 // -------------------- HSQL ----------------------------------------------

    // hql for insert update and delete
    public int bulkUpdate(String queryString);

    // hql for insert update and delete with parameter
    public int bulkUpdate(String queryString, Object[] values);

    // hql for query
    public List find(String queryString);

    // hql for query with parameters
    public List find(String queryString, Object[] values);

    // named hql for query with parameters and names
    public List findByNamedParam(String queryString, String[] paramNames, Object[] values);
    
    // hql for query with pagination
    public List find(final String hql, final int startIndex, final int resultNum);
    
    // hql for query with pagination and parameters
    public List find(final String hql, final Object value, final int startIndex, final int resultNum);
    
    // hql for query with pagination and parameters
    public List find(final String hql, final Object[] values, final int startIndex, final int resultNum);

    // find by sql
    public List<Map<String, Object>> executeQuerySQL(final String sql);
    
    public List<Map<String, Object>> executeQuerySQL(final String sql, final int startIndex, final int resultNum);
    // -------------------------------- Others -------------------------------- 
    // flush cache data into database only call after update
    public void flush(); 
    
    public void executeProcSQL(final String sql);

} 